<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>检查某个字符串 S1 是否出现在字符串 S2中</title>
</head>

<body>
    <script>
        var str = "sunny,woo";
        var sear = new RegExp('0')
        if (sear.test(str)) {
            alert('是');
        }
        else{
            alert('不是 ')
        }

    </script>
</body>

</html>